package com.learnhow.springboot.web.service;

import com.learnhow.springboot.web.dao.UserDao;
import com.learnhow.springboot.web.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    public User findUserByName(String username) {
        return userDao.findByUsername(username);
    }

    public void saveUser(User user) {
        userDao.save(user);
    }
}
